package com.pig4cloud.pigx.strategy.bo.okx;

import com.pig4cloud.pigx.strategy.bo.StrategyTaskContractCacheBO;
import com.pig4cloud.pigx.strategy.entity.StrategyOrderContract;
import com.pig4cloud.pigx.strategy.entity.StrategyPositionContract;
import com.pig4cloud.pigx.strategy.entity.StrategyTaskContract;
import lombok.Data;

import java.util.List;

/**
 * 下单BO
 *
 * @since 2022/11/29 17:16
 */
@Data
public class PlaceOrderBO extends StrategyOrderContract {

    private static final long serialVersionUID = 1L;

    /**
     * 多个订单下单时标记是否是第一个订单
     */
    private boolean isFirstOrder = true;

    /**
     * 是否是开仓
     */
    private boolean isOpen;
    /**
     * 是否是平仓
     */
    private boolean isClose;

    /**
     * 任务缓存
     * <p>下单前必须传入
     */
    private StrategyTaskContractCacheBO taskCache;

    /**
     * 仓位集合
     */
    private List<StrategyPositionContract> positionList;
    /**
     * 任务
     */
    private StrategyTaskContract task;

    /**
     * 源订单下单参数
     */
    private PlaceOrderBO srcOrderBO;

    /**
     * 第三方订单id
     */
    private Long externalOrderId;
}
